﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="DCCMS.Web.Admin.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>管理登陆</title>
    <link rel="Stylesheet" type="text/css" href="Css/Login.css" />
    <script language="javascript" type="text/javascript">
        function focusUserBox() {
//            var el = document.getElementById(txtBox);
//            el.focus();
        }

        function checkForIframe() {
            var parentWin = window;
            while (parentWin != parentWin.parent)
                parentWin = parentWin.parent;

            if (parentWin != window)
                parentWin.location.href = window.location.href;
        }

        if (window.addEventListener) { // Mozilla, Netscape, Firefox
            window.addEventListener('load', checkForIframe, false);
            window.addEventListener('load', focusUserBox, false);
        }
        else if (window.attachEvent) { // IE
            window.attachEvent('onload', checkForIframe);
            window.attachEvent('onload', focusUserBox);
        }
        else {
            window.onload = function () { checkForIframe(); focusUserBox(); }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="loginBox">
        <h1>
            <span>柱子空压机 |</span><strong id="projectName" runat="server"></strong></h1>
        <h2>
            <asp:Literal ID="Literal2" runat="server" Text="哥要登陆"></asp:Literal></h2>
         <asp:Login ID="ctrLogin" runat="server">
            <LayoutTemplate>
                <fieldset>
                    <p class="failure">
                        <asp:Label runat="server" ID="FailureText" EnableViewState="False" Style="color: Red" /></p>
                    <ol>
                        <li>用户名：<asp:TextBox runat="server" ID="UserName" AccessKey="u" CssClass="login" /><asp:RequiredFieldValidator
                            runat="server" ID="UserNameRequired" ControlToValidate="UserName" ValidationGroup="LoginBox"
                            ErrorMessage="*" ToolTip="用户名不能为空" CssClass="validator" /></li>
                        <li>密&nbsp;&nbsp;&nbsp;&nbsp;码：<asp:TextBox runat="server" ID="Password" TextMode="Password"
                            AccessKey="p" CssClass="login" /><asp:RequiredFieldValidator runat="server" ID="PasswordRequired"
                                ControlToValidate="Password" ValidationGroup="LoginBox" ErrorMessage="*" ToolTip="密码不能为空"
                                CssClass="validator" /></li>
                        <li class="check">
                            <asp:CheckBox runat="server" ID="RememberMe" /><asp:Literal ID="Literal3" runat="server" Text="在此电脑上记住登陆信息！"></asp:Literal></li>
                        <li class="submit">
                            <asp:Button ID="LoginButton" runat="server" CssClass="CmsBut"
                                ValidationGroup="LoginBox" Text="登  陆" OnClick="LoginButton_Click"></asp:Button></li>
                    </ol>
                </fieldset>
            </LayoutTemplate>
        </asp:Login>      
        <address>
            版权所有©2010-2012 Martin Ding. All rights reserved.</address>
    </div>
    </form>
</body>
</html>
